package com.wuyan.example.provider;

import com.wuyan.example.common.service.UserService;
import com.wuyan.wurpc.RpcApplication;
import com.wuyan.wurpc.bootstrap.ProviderBootstrap;
import com.wuyan.wurpc.config.RegistryConfig;
import com.wuyan.wurpc.config.RpcConfig;
import com.wuyan.wurpc.model.ServiceMetaInfo;
import com.wuyan.wurpc.model.ServiceRegisterInfo;
import com.wuyan.wurpc.registry.LocalRegistry;
import com.wuyan.wurpc.registry.Registry;
import com.wuyan.wurpc.registry.RegistryFactory;
import com.wuyan.wurpc.server.tcp.VertxTcpServer;

import java.util.ArrayList;
import java.util.List;

/**
 * 服务提供者示例
 */
public class ProviderExample {

    public static void main(String[] args) {
        //要注册的服务
        List<ServiceRegisterInfo<?>> serviceRegisterInfoList = new ArrayList<>();
        ServiceRegisterInfo serviceRegisterInfo = new ServiceRegisterInfo<>(UserService.class.getName(), UserServiceImpl.class);
        serviceRegisterInfoList.add(serviceRegisterInfo);

        //服务提供者初始化
        ProviderBootstrap.init(serviceRegisterInfoList);

    }

}
